package mvc.model.vo;

public class P_info {
    private int number;
    private int rsize;
    private int msize;
    private String color;
    private String online;
    private String cpu;

    @Override
    public String toString() {
        return online + " " + color + " " + rsize + "+" + msize + "G";
    }

    public P_info(int number, int rsize, int msize, String color, int online, String cpu) {
        this.number = number;
        this.rsize = rsize;
        this.msize = msize;
        this.color = color;
        this.online = online == 0 ? "全网通公开版" : online == 1 ? "移动" : online == 2 ? "联通" : "电信";
        this.cpu = cpu;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getRsize() {
        return rsize;
    }

    public void setRsize(int rsize) {
        this.rsize = rsize;
    }

    public int getMsize() {
        return msize;
    }

    public void setMsize(int msize) {
        this.msize = msize;
    }

    public String getOnline() {
        return online;
    }

    public void setOnline(int online) {
        this.online = online == 0 ? "全网通" : online == 1 ? "移动" : online == 2 ? "联通" : "电信";;
    }

    public String getCpu() {
        return cpu;
    }

    public void setCpu(String cpu) {
        this.cpu = cpu;
    }

    public P_info() {
    }
}
